package com.easybuilder.core.seo.controller;


import com.easybuilder.core.seo.service.SeoRenderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/seo/render")
public class SeoRenderController {

    @Resource
    private SeoRenderService seoRenderService;

    @GetMapping("/articleDetail/{id}.html")
    public Object articleDetailRender(@PathVariable(name = "id") Long id){
        String html = seoRenderService.articleDetailRender(id);
        return html;
    }

    @GetMapping("/pc/articleDetail/{id}.html")
    public Object pcArticleDetailRender(@PathVariable(name = "id") Long id){
        String html = seoRenderService.articleDetailRender(id);
        return html;
    }


}
